#region Summary

// 
// Owner : JackieHan 
// 
// Solution : ResearchTest 
// 
// Project : JackieHan.DotNet.LinqTest
// 
// File : AggregateTester.cs
// 
// CopyRight : Copyright © 2010-2011 Skomart Corporation, All Rights Reserved 
// 
// Summary : LinQ 累加器测试
// 
// History : 
//			2011-11-17 10:54:25	    Create 
// 

#endregion

#region Using

using System;
using System.Linq;
using System.Collections.Generic;
using NUnit.Framework;
using SharpTestsEx;

#endregion

namespace JackieHan.DotNet.LinqTest
{
    /// <summary> 
    /// LinQ 累加器测试
    /// </summary>
    [TestFixture]
    public class AggregateTester
    {

        [SetUp]
        public void SetUp()
        {
        }

        [Test]
        public void TestAggregateCollectionToString()
        {
            var strsList = new List<string> { "JackieHan", "is", "my", "name", "!" };
            var aggregateStr = strsList.Aggregate(string.Empty, (current, item) => current + item);
            aggregateStr.Should().Be("JackieHanismyname!");
        }

        [TearDown]
        public void TearDown()
        {
        }
    }
}